package com.xujie.sportsmeeting.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

/**
 * 成绩录入请求DTO
 */
@Data
@Schema(description = "成绩录入请求参数")
public class ScoreRecordDTO {

    @Schema(description = "成绩ID(更新时需要)")
    private Long id;

    @Schema(description = "项目ID", example = "1")
    @NotNull(message = "项目ID不能为空")
    private Long eventId;

    @Schema(description = "运动员ID", example = "1")
    @NotNull(message = "运动员ID不能为空")
    private Long athleteId;

    @Schema(description = "报名ID", example = "1")
    @NotNull(message = "报名ID不能为空")
    private Long registrationId;

    @Schema(description = "成绩值", example = "10.85")
    @NotBlank(message = "成绩值不能为空")
    private String scoreValue;

    @Schema(description = "成绩类型", example = "time", allowableValues = {"time", "distance", "score"})
    private String scoreType;

    @Schema(description = "是否最终成绩", example = "1", allowableValues = {"0", "1"})
    private Integer isFinal;

    @Schema(description = "裁判员ID")
    private Long judgeId;

    @Schema(description = "备注", example = "打破记录")
    private String remarks;
}
